package com.iyjhsoc.game.util;

public class GameUtil {

    public static Integer getMatchSecond(String matchTimeStr){
        Integer matchTime = 0;
        String[] split = matchTimeStr.split(":");
        if (split.length == 3) {
            matchTime += (Integer.valueOf(split[0]) * 60 * 60);
            matchTime += (Integer.valueOf(split[1]) * 60);
            matchTime += Integer.valueOf(split[2]);
        } else if (split.length == 2) {
            matchTime += (Integer.valueOf(split[0]) * 60);
            matchTime += Integer.valueOf(split[1]);
        } else {
            matchTime = Integer.valueOf(split[0]);
        }
        return matchTime;
    }
}
